<?php
	$template['title']='联系我们';
	include 'inc/header_inc.php';
?>
		
			<!-- 当前位置 -->
			<div class="loaction">
				<ol class="breadcrumb">
					<li><img src="img/location.gif" />当前位置:</li>
					<li><a href="index.php"> 首页 </a> >> <a href="contactUs.php" class="active"> 联系我们</a></li>
					<div class="search">
						<form action="" method="post">
							<input type="text" placeholder="请输入关键字查询.." name="search" class="form-control" />
							<input type="submit" class="btn btn-primary" value="搜索" />
						</form>
					</div>
				</ol>
			</div>

			<div id="main">
				<div class="left">
					<div class="title">
						<img src="img/index/content_title08.gif" alt="" />
					</div>
					<!-- 内容 -->
					<div class="about">
						<a href="http://wpa.qq.com/msgrd?v=3&uin=740092856&site=qq&menu=yes"><img src="img/index/about.gif" class="kefu" /></a>
						<div id="content"><p style="text-align:center; font-size:18px;" class="tip"><span>内容正在加载中...</span><img src="img/loading.gif" style="width:80px;" /></p></div>
					</div>
					<div class="map">
						<div class='map_title'>地理位置</div>
						<div id="map2"></div>
					</div>

					<div class="book">
						<form action="feedback.php" onsubmit="return checkView2()" method="get">
							<div class="form-group">
								<li class="form-title">
									在线留言
								</li>
								<li>
									<label for="username">真实姓名：</label>
									<input type="text" required="required" class="form-control" id="username" name="username" placeholder="请输入您的姓名" />
								</li>
								<li>
									<label for="tel">手机号/固话：</label>
									<input type="tel" required="required" class="form-control" id="tel" name="tel" placeholder="请输入您的电话" />
								</li>
								<li>
									<label for="email">email：</label>
									<input type="email" required="required" class="form-control" id="email" name="email" placeholder="请输入您的邮箱" />
								</li>
								<li class="backcon">
									<label for="view">反馈内容：</label>
									<textarea id="view" required="required" name="view" maxlength="255" placeholder="请输入15~255个字符，留下您宝贵的意见！" class="form-control" rows="7" cols="45"></textarea>
								</li>
								<li>
									<label for=""></label>
									<input type="hidden" name="url" value="contactUs.php" />
									<input type="submit" name="submit3" value="提交" class="btn btn-primary">
								</li>
							</div>
						</form>
					</div>
				</div>
				<?php
					include 'inc/sidebar_inc.php';
				?>
			</div>
			<!-- 友情链接 -->
			<div class="friendly">
				<div class="silde">友<br/>情<br/>链<br/>接</div>
				<ul>
				<p style="text-align:center; font-size:18px;" class="tip"><span>内容正在加载中...</span><img src="img/loading.gif" style="width:80px;" /></p>
				</ul>
			</div>
		</div>
		<?php
			include 'inc/footer_inc.php';
		?>
	
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
	<script type="text/javascript">

		$(function (){
			nav();
			var content = document.getElementById('content');
			//单页信息
			$.ajax({
				type:"post",
				url:"inc/infodata_inc.php?onepage=1",
				async:true,
				success : function (data){
					if(data){
						var json=eval("("+data+")");
						for(var i=0; i<json.length; i++){
							content.innerHTML = json[i].content;
						}
						$('.tip').css('display' , 'none');
					}
				}
			});
		});
		
		var textarea2=document.getElementsByTagName('textarea')[0];
		function checkView2(){
			if(textarea2.value==""){
				alert('请输入留言内容!');
				formGroup.classList.add('has-warning');
				return false;
			}
			return true;
		}


		setTimeout(map, 1000);

		function map(){
			// 百度地图API功能
			//经度纬度坐标
			var x = 113.347382;
			var y = 22.942479;
			var ggPoint = new BMap.Point(x,y);

			//地图初始化
			var bm = new BMap.Map("map2");
			bm.centerAndZoom(ggPoint, 15);
			bm.addControl(new BMap.NavigationControl());

			//添加谷歌marker和label
			var markergg = new BMap.Marker(ggPoint);
			bm.addOverlay(markergg); //添加谷歌marker
			var labelgg = new BMap.Label("悠游网络科技股份有限公司",{offset:new BMap.Size(20,-10)});
			markergg.setLabel(labelgg); //添加谷歌label

			//坐标转换完之后的回调函数
			translateCallback = function (data){
				if(data.status === 0) {
					var marker = new BMap.Marker(data.points[0]);
					bm.addOverlay(marker);
					var label = new BMap.Label("悠游网络科技股份有限公司",{offset:new BMap.Size(20,-10)});
					marker.setLabel(label); //添加百度label
					bm.setCenter(data.points[0]);
				}
			}
		}
	</script>